import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/notice_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class NoticeListEntity {
  int? total;
  List<NoticeData>? data;

  NoticeListEntity();

  factory NoticeListEntity.fromJson(Map<String, dynamic> json) =>
      $NoticeListEntityFromJson(json);

  Map<String, dynamic> toJson() => $NoticeListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NoticeData {
  int? createdAt;
  int? updatedAt;
  int? id;
  String? uid;
  String? orgId;
  String? name;
  String? target;
  int? type;
  int? shareType;
  String? title;
  String? content;
  String? phoneNumber;
  String? remark;
  bool? isRead;

  NoticeData();

  factory NoticeData.fromJson(Map<String, dynamic> json) =>
      $NoticeDataFromJson(json);

  Map<String, dynamic> toJson() => $NoticeDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
